package com.system.outpatientsystem.service.impl;


import com.system.outpatientsystem.mapper.RecordMapper;
import com.system.outpatientsystem.pojo.User;
import com.system.outpatientsystem.pojo.record_table;
import com.system.outpatientsystem.pojo.record_table;
import com.system.outpatientsystem.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class RecordServiceImpl implements RecordService {

    @Autowired
    private RecordMapper recordMapper;

    @Override
    public record_table findById(Integer id) {
        return recordMapper.findById(id);
    }

    @Override
    public List<record_table> findByUserId(Integer id){
        List<record_table> res=recordMapper.findByUserId(id);
        return res;
    }

    @Override
    public void recordInsert(record_table table) {
        table.setFormulationPrice(0);
        table.setPayStatus(0);
        recordMapper.add(table);
    }

    @Override
    public void recordUpdate(record_table table) {
        recordMapper.recordUpdate(table);
    }


}
